<html>
<head><meta charset="utf-8"><title>place-16bytes-plan · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html">place-16bytes-plan</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="163106334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163106334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163106334">(Apr 11 2019 at 14:47)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> so from today's <span class="user-group-mention" data-user-group-id="897">@T-compiler/meeting</span>, <span class="user-mention" data-user-id="116083">@pnkfelix</span> asked how was the plan to get <code>Place</code> from 24 bytes back to 16 bytes :)</p>



<a name="163106461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163106461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163106461">(Apr 11 2019 at 14:48)</a>:</h4>
<p>(i could imagine a "fat index" type that couples an index (into an interned table of <code>[PlaceProjection]'s</code> with a length, analogous to how a <code>&amp;[T]</code> slice is a fat pointer)</p>



<a name="163106518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163106518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163106518">(Apr 11 2019 at 14:49)</a>:</h4>
<p>There are multiple possibilities. One that doesn't work yet is to make <code>Place</code> an unsized type where the <code>projections</code> field is <code>[PlaceProjection]</code></p>



<a name="163106615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163106615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163106615">(Apr 11 2019 at 14:50)</a>:</h4>
<p>Another one is to intern/box <code>Place</code> before putting it into <code>Statement</code> (which would get us down to 8 bytes.</p>



<a name="163106674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163106674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163106674">(Apr 11 2019 at 14:51)</a>:</h4>
<p>And yet another one is to work on <code>PlaceBase</code>'s fields to see how to make them smaller</p>



<a name="163106695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163106695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163106695">(Apr 11 2019 at 14:51)</a>:</h4>
<p>I remember having a fourth avenue, but it escapes me atm</p>



<a name="163107864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163107864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163107864">(Apr 11 2019 at 15:03)</a>:</h4>
<blockquote>
<p>Another one is to intern/box <code>Place</code> before putting it into <code>Statement</code> (which would get us down to 8 bytes.</p>
</blockquote>
<p>it would, but it add cost elsewhere, right? If most Statements actually own one or more places, then this is a net loss, right?</p>



<a name="163108648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163108648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163108648">(Apr 11 2019 at 15:12)</a>:</h4>
<p>True</p>



<a name="163108670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan/near/163108670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/place-16bytes-plan.html#163108670">(Apr 11 2019 at 15:12)</a>:</h4>
<p>And most statements do have a destination place</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>